package com.gp.testonline.controller;

import com.gp.testonline.eo.QuestionkindEOPage;
import com.gp.testonline.service.QuestionkindService;
import com.gp.testonline.tool.ResponseMessage;
import com.gp.testonline.tool.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 对外提供数据服务接口
 */
@Api(tags = "questionkind")
@RestController
public class QuestionkindController {
    @Autowired
    private QuestionkindService questionkindService;

    @ApiOperation(value = "获取班考题类型信息")
    @RequestMapping(value = "/getQuestionkind",produces = "application/json;charest=utf-8",method = RequestMethod.PUT)
    public ResponseMessage getQuestionkind(QuestionkindEOPage questionkindEOPage) {
        Map<String, List> map = new HashMap<>();
        List<QuestionkindEOPage> listClass = questionkindService.getQuestionkindAll(questionkindEOPage);
        map.put("list", listClass);
        return Result.success("200", map);
    }
}
